package sh.wn36.vehiclemanage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import sh.wn36.vehiclemanage.entity.Driver;
import sh.wn36.vehiclemanage.mapper.DriverMapper;
import sh.wn36.vehiclemanage.service.DriverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import sh.wn36.vehiclemanage.vo.driverInfo;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xk
 * @since 2021-04-26
 */
@Service
public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements DriverService {

    @Autowired
    private DriverMapper driverMapper;


    @Override
    public IPage<driverInfo> getAll1(Page<driverInfo> page, QueryWrapper<driverInfo> queryWrapper) {
        return driverMapper.selectPage(page,queryWrapper);
    }

    @Override
    public IPage<driverInfo> getAll2(Page<driverInfo> page) {
        return driverMapper.listPage(page);
    }

    @Override
    public List<Driver> getAll3() {
        return driverMapper.getDriver1();
    }


}



